package org.csu.onlineedubackend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.csu.onlineedubackend.dto.CourseCommentDTO;
import org.csu.onlineedubackend.entity.CourseStudentComment;

/**
 * Service interface for CourseStudentComment entity
 */
public interface CourseStudentCommentService extends IService<CourseStudentComment> {
    
    /**
     * Get course comments by course ID
     * @param courseId Course ID
     * @param page Pagination parameters
     * @return Page of course comments
     */
    IPage<CourseCommentDTO> getCourseComments(Integer courseId, Page<CourseCommentDTO> page);
    
    /**
     * Add a comment to a course
     * @param courseId Course ID
     * @param studentId Student ID
     * @param content Comment content
     * @param stars Rating (stars)
     * @return true if successful, false otherwise
     */
    boolean addCourseComment(Integer courseId, Integer studentId, String content, Integer stars);
} 